﻿<UserControl x:Class="StockAnalyst2.MainToolBar"
             x:ClassModifier="internal"
			 
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             
			 xmlns:Converters="clr-namespace:Utils.Wpf.Converters;assembly=Utils"
			 xmlns:WpfUtils="clr-namespace:Utils.Wpf;assembly=Utils" 
			 xmlns:SA2="clr-namespace:StockAnalyst2.Converters" 
			 xmlns:StockAnalyst2="clr-namespace:StockAnalyst2"
			 
             mc:Ignorable="d" 
			 
			 d:DesignWidth="1800" 
			 d:DataContext="{d:DesignInstance Type=StockAnalyst2:MainToolBarVM}" >

	<UserControl.Resources>
		<ResourceDictionary>
			<SA2:IsPluginToolBarVisibleConverter x:Key="IsPluginToolBarVisibleConverter" />
			<Converters:MultiplierConverter x:Key="MultiplierConverter" />
			<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
			<Converters:NegatedBooleanToVisibilityConverter x:Key="NegatedBooleanToVisibilityConverter" />
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="StockAnalystTheme.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>

	<ToolBarTray Background="{StaticResource TopbarBackground}" >
		<!-- Historical ToolBar (create it first as others use the DatePicker size to size themselves -->
		<ToolBar Background="{StaticResource MenuBackground}" IsEnabled="{Binding IsHistoricalViewSelected}" BandIndex="1" >
			<TextBlock Margin="3,0,3,0" Text="Date:" VerticalAlignment="Center" Background="Transparent" Foreground="Black" >
					<TextBlock.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="TextBlock.IsEnabled" Value="False">
									<Setter Property="TextBlock.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</TextBlock.Style>
			</TextBlock>
			<DatePicker Margin="3,0,3,0" IsTodayHighlighted="True" VerticalAlignment="Center" SelectedDate="{Binding SelectedDate, Mode=TwoWay}" BorderThickness="0" Background="Transparent" x:Name="DatePicker" DisplayDateStart="{Binding FirstDate}" DisplayDateEnd="{Binding LastDate}" FirstDayOfWeek="Monday" Foreground="Black" CalendarOpened="DatePicker_CalendarOpened" WpfUtils:BlackoutDatesBinder.RegisterBlackoutDates="{Binding DaysWithoutData}" />
			<ContentControl>
				<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=0.8}" Command="{Binding ApplicationCommandsVM.MovePreviousDayCommand}" >
					<Image Source="Resources\Next.ico" RenderTransformOrigin="0.5 0.5" >
						<Image.RenderTransform>
							<RotateTransform Angle="180" />
						</Image.RenderTransform>
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<ContentControl>
				<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=0.8}" Command="{Binding ApplicationCommandsVM.MoveNextDayCommand}" >
					<Image Source="Resources\Next.ico" >
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<ContentControl>
				<Button Margin="5,0,0,0" Command="{Binding ApplicationCommandsVM.LoadDayCommand}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.1}" >
					<Button.ToolTip>
						<ToolTip>
							<StackPanel>
								<TextBlock FontWeight="Bold" Foreground="Black" Text="Load Day" />
								<TextBlock Foreground="Black" Text="Loads the data avaiable for the selected day." />
							</StackPanel>
						</ToolTip>
					</Button.ToolTip>
					<Image Source="Resources\LoadDay.ico" >
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<ContentControl>
				<Button Margin="5,0,10,0" Command="{Binding ApplicationCommandsVM.ClearDayCommand}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.1}" >
					<Button.ToolTip>
						<ToolTip>
							<StackPanel>
								<TextBlock FontWeight="Bold" Foreground="Black" Text="Clear Data" />
								<TextBlock Foreground="Black" Text="Unloads the data avaiable to save memory." />
							</StackPanel>
						</ToolTip>
					</Button.ToolTip>
					<Image Source="Resources\Clear.ico" Margin="3" >
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
		</ToolBar>
		
		<!-- Standard ToolBar -->
		<ToolBar Background="{StaticResource MenuBackground}" BandIndex="0" >
			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.ChangeCaptureRealTimeStatusCommand, UpdateSourceTrigger=PropertyChanged}" IsChecked="{Binding IsRealtimeEnabled, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" >
				<ToggleButton.Style>
					<Style>
						<Style.Triggers>
							<Trigger Property="ToggleButton.IsEnabled" Value="False">
								<Setter Property="ToggleButton.Opacity" Value="0.5" />
							</Trigger>
						</Style.Triggers>
					</Style>
				</ToggleButton.Style>
				<Image Source="Resources\Play.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Change Realtime Capture" />
							<TextBlock Foreground="Black" Text="Enables or disables the realtime capture." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>
			<Separator Margin="7,0,7,0" />
			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.ViewRealTimeDataCommand}" IsChecked="{Binding IsRealTimeViewSelected, Mode=OneWay}" >
				<Image Source="Resources\RealTime.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="View Realtime" />
							<TextBlock Foreground="Black" Text="Displays the realtime stock values." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>
			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.ViewHistoricalDataCommand}" IsChecked="{Binding IsHistoricalViewSelected, Mode=OneWay}" >
				<Image Source="Resources\Calendar.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="View Historical" />
							<TextBlock Foreground="Black" Text="Displays the historical stock values." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>
			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.ViewRealtimePluginsCommand}" IsChecked="{Binding IsRealtimePluginsViewSelected, Mode=OneWay}" >
				<Image Source="Resources\RealTimePlugins.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="View RealTime Plugins" />
							<TextBlock Foreground="Black" Text="Displays the plugins that can be executed over real time data." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>

			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.ViewHistoricalPluginsCommand}" IsChecked="{Binding IsHistoricalPluginsViewSelected, Mode=OneWay}" >
				<Image Source="Resources\HistoricalPlugins.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="View Historical Plugins" />
							<TextBlock Foreground="Black" Text="Enables the execution of strategy plugins over historical data." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>
			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.ViewChartCommand}" IsChecked="{Binding IsChartViewSelected, Mode=OneWay}" >
				<Image Source="Resources\Chart.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Show Chart" />
							<TextBlock Foreground="Black" Text="Shows the chart window." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>
			<Separator Margin="7,0,7,0" />
			<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.GridOptionsCommand}" >
				<Image Source="Resources\Grid.ico" />
				<Button.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Grid Options" />
							<TextBlock Foreground="Black" Text="Displays the grid options dialog to configure the viewers." />
						</StackPanel>
					</ToolTip>
				</Button.ToolTip>
			</Button>
			<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.OptionsCommand}">
				<Image Source="Resources\Options.ico" />
				<Button.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Options" />
							<TextBlock Foreground="Black" Text="Displays the options dialog to configure the application." />
						</StackPanel>
					</ToolTip>
				</Button.ToolTip>
			</Button>
			<Separator Margin="7,0,7,0" />
			<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ApplicationCommandsVM.OpenBrowserCommand}" >
				<Image Source="Resources\Browser.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<Button.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Open Browser" />
							<TextBlock Foreground="Black" Text="Opens a browser to navigate thru the provider." />
						</StackPanel>
					</ToolTip>
				</Button.ToolTip>
			</Button>

		</ToolBar>

		<!-- Plugins ToolBar -->
		<ToolBar BandIndex="2" x:Name="PluginsToolBar" IsEnabled="{Binding IsHistoricalPluginsViewSelected}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.3}" Visibility="{Binding Items.Count, Converter={StaticResource IsPluginToolBarVisibleConverter}, RelativeSource={RelativeSource Mode=Self}}" />

		<!-- Filter ToolBar -->
		<ToolBar BandIndex="3" IsEnabled="{Binding IsFilteringEnabled}" >
			<TextBlock Margin="3,0,3,0" Text="Name Filter:" VerticalAlignment="Center" Background="Transparent" Foreground="Black" x:Name="FilterTextBlock" >
					<TextBlock.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="TextBlock.IsEnabled" Value="False">
									<Setter Property="TextBlock.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</TextBlock.Style>
			</TextBlock>
			<TextBox Width="{Binding ActualWidth, ElementName=FilterTextBlock, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.8}" PreviewKeyDown="TextBox_PreviewKeyDown" Visibility="{Binding IsRealTimeViewSelected, Converter={StaticResource BooleanToVisibilityConverter}}" Text="{Binding RealTimeNameFilter, UpdateSourceTrigger=PropertyChanged}" />
			<TextBox Width="{Binding ActualWidth, ElementName=FilterTextBlock, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.8}" PreviewKeyDown="TextBox_PreviewKeyDown" Visibility="{Binding IsHistoricalViewSelected, Converter={StaticResource BooleanToVisibilityConverter}}" Text="{Binding HistoricalNameFilter, UpdateSourceTrigger=PropertyChanged}" />
			<TextBox Width="{Binding ActualWidth, ElementName=FilterTextBlock, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.8}" PreviewKeyDown="TextBox_PreviewKeyDown" Visibility="{Binding IsFilteringEnabled, Converter={StaticResource NegatedBooleanToVisibilityConverter}}" Text="" BorderThickness="0" />
			<ContentControl>
				<Button Margin="5,0,10,0" Command="{Binding ApplicationCommandsVM.ApplyNameFilterCommand}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.1}" >
					<Button.ToolTip>
						<ToolTip>
							<StackPanel>
								<TextBlock FontWeight="Bold" Foreground="Black" Text="Apply Filter" />
								<TextBlock Foreground="Black" Text="Applies the selected filter over the current view." />
							</StackPanel>
						</ToolTip>
					</Button.ToolTip>
					<Image Source="Resources\LoadDay.ico" RenderTransformOrigin="0.5 0.5" >
						<Image.RenderTransform>
							<RotateTransform Angle="270" />
						</Image.RenderTransform>
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
		</ToolBar>

		<!--  Chart toolbar -->
		<ToolBar BandIndex="4" IsEnabled="{Binding IsChartViewSelected}" >
			<ToggleButton Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" IsChecked="{Binding ChartToolBarVM.IsRealTimeEnabled, Mode=TwoWay}">
				<Image Source="Resources\RealTimeChart.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<ToggleButton.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Enable Realtime" />
							<TextBlock Foreground="Black" Text="Changed the chart from realtime to historical." />
						</StackPanel>
					</ToolTip>
				</ToggleButton.ToolTip>
			</ToggleButton>
			<ComboBox Margin="5,0,5,0" Style="{DynamicResource {x:Type ComboBox}}" ItemsSource="{Binding ChartToolBarVM.StockNames}" SelectedItem="{Binding ChartToolBarVM.SelectedStockName, Mode=TwoWay}" DropDownOpened="ComboBox_DropDownOpened" Width="{Binding ActualWidth, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.6}" >
				<ComboBox.ToolTip>
					<StackPanel>
						<TextBlock Foreground="Black" FontWeight="Bold" Text="Selected Stock" />
						<TextBlock Foreground="Black" Text="The commodity to be used by the engine to execute the strategy." />
					</StackPanel>
				</ComboBox.ToolTip>
			</ComboBox>
			<DatePicker Margin="3,0,3,0" IsTodayHighlighted="True" VerticalAlignment="Center" SelectedDate="{Binding ChartToolBarVM.SelectedDate, Mode=TwoWay}" BorderThickness="0" Background="Transparent" DisplayDateStart="{Binding ChartToolBarVM.FirstDate}" DisplayDateEnd="{Binding ChartToolBarVM.LastDate}" FirstDayOfWeek="Monday" Foreground="Black" CalendarOpened="DatePickerChart_CalendarOpened" WpfUtils:BlackoutDatesBinder.RegisterBlackoutDates="{Binding ChartToolBarVM.DaysWithoutData}" IsEnabled="{Binding ChartToolBarVM.AreParametersOkToRefreshDays}"  />
			<ContentControl>
				<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=0.8}" Command="{Binding ChartToolBarVM.ChartCommandsVM.MovePreviousDayCommand}" >
					<Image Source="Resources\Next.ico" RenderTransformOrigin="0.5 0.5" >
						<Image.RenderTransform>
							<RotateTransform Angle="180" />
						</Image.RenderTransform>
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<ContentControl>
				<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=0.8}" Command="{Binding ChartToolBarVM.ChartCommandsVM.MoveNextDayCommand}" >
					<Image Source="Resources\Next.ico" >
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<ContentControl>
				<Button Margin="5,0,0,0" Command="{Binding ChartToolBarVM.ChartCommandsVM.LoadStockCommand}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.1}" >
					<Button.ToolTip>
						<ToolTip>
							<StackPanel>
								<TextBlock FontWeight="Bold" Foreground="Black" Text="Create Chart" />
								<TextBlock Foreground="Black" Text="Loads the selected stock on the chart." />
							</StackPanel>
						</ToolTip>
					</Button.ToolTip>
					<Image Source="Resources\LoadDay.ico" >
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<ContentControl>
				<Button Margin="5,0,5,0" Command="{Binding ChartToolBarVM.ChartCommandsVM.ClearStockCommand}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.1}" >
					<Button.ToolTip>
						<ToolTip>
							<StackPanel>
								<TextBlock FontWeight="Bold" Foreground="Black" Text="Clear Data" />
								<TextBlock Foreground="Black" Text="Clears the current chart to save memory." />
							</StackPanel>
						</ToolTip>
					</Button.ToolTip>
					<Image Source="Resources\Clear.ico" Margin="3" >
						<Image.Style>
							<Style>
								<Style.Triggers>
									<Trigger Property="Image.IsEnabled" Value="False" >
										<Setter Property="Image.Opacity" Value="0.5" />
									</Trigger>
								</Style.Triggers>
							</Style>
						</Image.Style>
					</Image>
				</Button>
			</ContentControl>
			<Button Margin="5,0,0,0" Command="{Binding ChartToolBarVM.ChartCommandsVM.ZoomCommand}" Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1.1}" >
				<Button.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Clear Data" />
							<TextBlock Foreground="Black" Text="Clears the current chart to save memory." />
						</StackPanel>
					</ToolTip>
				</Button.ToolTip>
				<Image Source="Resources\Zoom.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
			</Button>
			<Button Height="{Binding ActualHeight, ElementName=DatePicker, Converter={StaticResource MultiplierConverter}, ConverterParameter=1}" Command="{Binding ChartToolBarVM.ChartCommandsVM.ShowOptionsCommand}" Margin="5,0,5,0">
				<Image Source="Resources\Options.ico" >
					<Image.Style>
						<Style>
							<Style.Triggers>
								<Trigger Property="Image.IsEnabled" Value="False" >
									<Setter Property="Image.Opacity" Value="0.5" />
								</Trigger>
							</Style.Triggers>
						</Style>
					</Image.Style>
				</Image>
				<Button.ToolTip>
					<ToolTip>
						<StackPanel>
							<TextBlock FontWeight="Bold" Foreground="Black" Text="Options" />
							<TextBlock Foreground="Black" Text="Displays the options dialog to configure the application." />
						</StackPanel>
					</ToolTip>
				</Button.ToolTip>
			</Button>
		</ToolBar>
	</ToolBarTray>
</UserControl>
